<template>
	<view class="item" @click="godetail">
		<view class="top">
			<image :src="dataDetail.schoolIconUrl" mode="widthFix"></image>
			<view class="">
				<view class="schoolName">
					{{dataDetail.schoolName}}
				</view>
				<view class="tag">
					{{dataDetail.schoolTag}}
				</view>
			</view>
			<view class="type">
				{{dataDetail.adjustCollectedFlag == '0' ? '官网' : '其他'}}
			</view>
		</view>
		<u-divider></u-divider>
		<view class="bottom">
			<view class="item-msg">
				<view class="label">
					学院：
				</view>
				<view class="value">
					{{dataDetail.collegeName}}
				</view>
			</view>
			<view class="item-msg">
				<view class="label">
					名额：
				</view>
				<view class="value">
					{{dataDetail.num}}
				</view>
			</view>
	
			<view class="item-msg">
				<view class="label">
					学科：
				</view>
				<view class="value">
					{{dataDetail.majorName}}
				</view>
			</view>
			<view class="item-msg">
				<view class="label">
					学科代码：
				</view>
				<view class="value">
					{{dataDetail.major1Code}}
				</view>
			</view>
		</view>
		<view class="time">
			发布时间：{{dataDetail.time}}
		</view>
	</view>
</template>

<script>
	export default {
		props:
			{
				dataDetail:{
					type:Object,
					default:{},
				}
			}
		,
		data() {
			return {
				
			};
		},
		methods:{
			godetail(schoolName) {
				uni.navigateTo({
					// url:'schoolMsg/'
					url:'/schoolMsg/adjustDetail/index?adjustInfoId=' + this.dataDetail.adjustInfoId
				})
			}
		}
	};
</script>

<style lang="scss" scoped>
	.item {
		margin-top: 20rpx;
		border-radius: 20rpx;
		background-color: #fff;
		position: relative;
		padding: 20rpx;
		box-sizing: border-box;
		font-size: 28rpx;
		.type {
			position: absolute;
			right: 20rpx;
			padding: 5rpx 15rpx;
			top: 20rpx;
			background-color: #fdf6ec;
			color: #e5b76b;
			border-radius: 10rpx;
		}
		.top {
			display: flex;
			align-items: center;
			.schoolName {
				font-size: 30rpx;
				font-weight: 700;
			}
			.tag {
				display: inline-block;
				background-color: #7435e5;
				border-radius: 10rpx;
				padding: 5rpx 15rpx;
				color:#fff ;
				margin-top: 10rpx;
			}
			image {
				width: 80rpx;
				height: 80rpx;
				border-radius: 50%;
				margin-right: 20rpx;
			}
		}
	
		.bottom {
			display: flex;
			flex-wrap: wrap;
	
			.item-msg {
				display: flex;
				width: 310rpx;
				margin-bottom: 10rpx;
				.label {
					font-weight: 700;
					
					white-space: nowrap;
				}
	
				.value {
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
				}
	
			}
		}
	}
</style>